import Vue from 'vue';
import VueRouter from 'vue-router';

import home from '../components/home.vue';
import goods from '../components/goods.vue';
import car from '../components/car.vue';
import contact from '../components/contact.vue';
import college from '../components/college.vue';
import news from '../components/secondary_pages/news.vue';
import garbage from '../components/secondary_pages/garbage.vue';
import jokes from '../components/secondary_pages/jokes.vue';
import logistics from '../components/secondary_pages/logistics.vue';
import music from '../components/secondary_pages/music.vue';
import weather from '../components/secondary_pages/weather.vue';
import identity from '../components/secondary_pages/identity.vue';
import news_details from '../components/secondary_pages/news_details.vue';
import music_box from '../components/secondary_pages/music_box.vue';
import music_search_details from '../components/secondary_pages/music_search_details.vue';
import goods_details from '../components/secondary_pages/goods_details.vue';

Vue.use(VueRouter);

const router = new VueRouter({
    routes: [{
            path: '/',
            redirect: '/home',
        },
        {
            path: '/home',
            component: home,
        }, {
            path: '/goods',
            component: goods,
        }, {
            path: '/car',
            component: car,
        }, {
            path: '/contact',
            component: contact,
        }, {
            path: '/home/college',
            component: college,
        }, {
            path: '/home/news',
            component: news,
        }, {
            path: '/home/garbage',
            component: garbage,
        }, {
            path: '/home/jokes',
            component: jokes,
        }, {
            path: '/home/logistics',
            component: logistics,
        }, {
            path: '/home/music',
            component: music,
        }, {
            path: '/home/weather',
            component: weather,
        }, {
            path: '/home/identity',
            component: identity,
        }, {
            path: '/home/news/news_details',
            component: news_details,
        },
        {
            path: '/home/music/music_box',
            component: music_box

        },
        {
            path: '/home/music/music_search_details',
            component: music_search_details
        },
        {
            path: '/home/goods/goods_details',
            component: goods_details
        }
    ]
});

export default router